package cn.stimd.spring.validation;

/**
 * 封装了一个对象错误，即对象拒绝访问的全局原因
 * <p>
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public class ObjectError {
    private final String objectName;
    private final String code;
    private final String defaultMessage;


    public ObjectError(String objectName, String code, String defaultMessage) {
        this.objectName = objectName;
        this.code = code;
        this.defaultMessage = defaultMessage;
    }

    public String getObjectName() {
        return objectName;
    }

    public String getCode() {
        return code;
    }

    public String getDefaultMessage() {
        return defaultMessage;
    }
}
